<template>
    <!-- 调换记录 -->
    <view class="goodsrecord-content">
      <view class="goodsrecord-item flex justify-between items-center mb-24" v-for="(item, index) in shopassistantList"
        :key="index" @click="onGoodsClick(item)">
        <view>
          <view class="tit mb-20">
            <text>申请时间{{ item.name }}</text>
            <text class="ml-8">{{ item.mobile }}</text>
          </view>
          <view class="subtit">
            {{ item.status }}
          </view>
        </view>
        <view>
          <image class="chevronright" :src="IMG_URL2+'common/chevron-right.svg'"></image>
        </view>
      </view>
      <up-divider v-if="shopassistantList.length>pageSize"  :text="loadStatus"></up-divider>
      <!-- <view class="button-box px-48">
        <view class="exit-login bg2" @click="AddClerk">确认</view>
      </view> -->
    </view>
  </template>
  
  <script setup>
  import { IMG_URL2 } from "@/config";
  import { shopApi } from "@/api";
  const shopassistantList = ref([]);
  
  let loadStatus =ref('正在加载中')
  let orderId = ref('')
  function getApplyAdujustRecord() {
    let params = {
      id:orderId.value
    }
    shopApi.APPLYADJUSTRECORDLIST(params).then((res) => {
      if (res.code == 200) {
        shopassistantList.value = res.result
      }else{
            uni.showToast({
                title: res.errMsg,
                icon: "success",
            });
        }
    });
  }
  
  onLoad((options) => {
    orderId.value = options.id;
    getApplyAdujustRecord()
  });
  

  
  const onGoodsClick = (item) => {
    uni.navigateTo({
      url: `/pages/order/goodsrecorddetails?item=${JSON.stringify(item)}`
    });
  };
  
  
  const AddClerk = () => {
    uni.navigateTo({
      url: `/pages/user/shopassistantedit`
    });
  };
  
  </script>
  
  <style lang="scss">
  page {
    background-color: #f3f3f3;
  }
  </style>
  <style lang="scss" scoped>
  .goodsrecord-content {
    position: relative;
  
    .goodsrecord-item {
      padding: 20px;
      box-sizing: border-box;
      background-color: #fff;
      margin-top: 24rpx;
  
      .tit {
        font-family: PingFang SC;
        font-size: 14px;
        font-weight: 400;
        text-align: left;
        color: rgba(0, 0, 0, 0.9);
      }
  
      .subtit {
        font-family: PingFang SC;
        font-size: 14px;
        text-align: left;
        color: rgba(0, 0, 0, 0.6);
  
      }
  
      .chevronright {
        width: 16px;
        height: 16px;
  
      }
    }
  
    .button-box {
      width: 100%;
      position: fixed;
      bottom: 0rpx;
      left: 0;
      z-index: 9;
      background-color: #fff;
    }
  
    .exit-login {
      width: 654rpx;
      height: 92rpx;
      line-height: 92rpx;
      background: #D68E44;
      color: #ffffff;
      text-align: center;
      border-radius: 64px;
      font-size: 32rpx;
      margin-bottom: 40rpx;
    }
  
    .bg1 {
      background: rgba(253, 236, 219, 1);
      color: rgba(145, 74, 0, 1);
    }
  
    .exit-login:after {
      border: none;
    }
  }
  </style>